<!--
 * @Author: atao
 * @Date: 2023-11-13 20:01:39
 * @LastEditTime: 2023-11-16 15:12:58
 * @FilePath: \yayun-web000\src\views\home\index.vue
-->
<template>
    <div>首页--{{ userInfo.name }}
        <div>
            <button @click="logoutEvt">退出登录</button>
        </div>
    </div>
</template>

<script>
import { TOKEN_CACHE } from '@/config/common.config'

export default {
    computed:{
        userInfo(){
            return this.$store.getters.userInfo
        }
    },
    methods: {
     logoutEvt(){
        sessionStorage.removeItem(TOKEN_CACHE)
        this.$router.push('/login')
     }   
    }
}
</script>
